<script setup>
import children from './components/children.vue';
import { ref, onMounted, onBeforeMount, onUpdated, nextTick } from 'vue'
onBeforeMount(() => {
  console.log("onBeforeMount");
})
const childref = ref();
onMounted(() => {
  childref.value.fn()
  console.log(childref.value.user);
  console.log("onMounted");
})

onUpdated(() => {
  console.log("onUpdated");
})
let count = ref(0);
const fn = (e) => {
  console.log("------------");
  count.value++;
}

console.log(1233);
</script>

<template>
  <children ref="childref"></children>
  <div>
    <button @click="fn">click</button>
  </div>
  <div>{{count}}</div>
</template>

<style scoped>
</style>
